<!DOCTYPE html>
<html>
<head>
    <title>嘿！</title>
    <style type="text/css">
    body{background-color: #ffffee;}
    #text{height:280px;color:#df6fe1; font-size:250 px;}
    </style>
</head>
<body>
    <p id="text"></p>    
<script>        
    var i=0;
    var str="亲爱的姐姐，圣诞快乐哦！Work hard with each other to become better people. This is a new agreement.    相互努力，成为更好的人，这是新的约定 --------------我们一起加油哦！ 要一起变得更好！！！";            
    window.onload=function typing(){
                //获取div
        var mydiv=document.getElementById("text");
        mydiv.innerHTML+=str.charAt(i);
        i++;
        var id=setTimeout(typing,80);
        if(i==str.length){
            clearTimeout(id);
            }
        }
</script>
</body>
</html>